package com.neusoft.liduan.d0915;

import java.awt.Graphics;

public class Square extends Shape {
	public Square() {
		
	}
	
	public Square(int x1, int y1, int x2, int y2) {
		super(x1, y1, x2, y2);
	}
	
	@Override
	public void draw(Graphics g) {
		g.drawRect(x1, y1, x2 - x1, y2 - y1);
	}

	@Override
	public String toString() {
		return "Square [x1=" + x1 + ", y1=" + y1 + ", x2=" + x2 + ", y2=" + y2 + "]";
	}
}
